#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
const long long Mod = 10e9+7;
int main()
{
    long long i,j,n,o=0,a[1000005],t=1;
    memset(a, 0, sizeof a);
    int sum=1;
    scanf("%lld", &n);
    while (n -- )
    {
        int b;
        cin>>b;
        
    for (int i = 2; i <= b/i; i ++ )
    {    
        if(b%i==0)
        {
            while(b%i==0)
            {
                b=b/i;
                a[i]++;
                
            }
            if(b>1) a[b]++;
            o++;
        }
    }
    for (int i = 0; i < o; i ++ )
    {
        printf("%lld ",a[i]);
        if(a[i]!=0) t=t*((a[i]+1)%Mod);
    }
    }
    printf("%lld",t%Mod);
    return 0;
}
